<?php
class Application_Form_Login extends Zend_Form
{
    public function init()
    {
        $this->setAction("/login");        
        $this->setName("login");
        $this->setMethod('post');
  		         
        $token = new Zend_Form_Element_Hash('token');
        $token->setSalt(md5(uniqid(rand(), TRUE)));
        $token->setTimeout(120);
       // $this->addElement($token);
             
                                                    
        $this->addElement('text', 'username', array(
            'filters'    => array('StringTrim'),
            'required'   => true,
            'label'      => 'Usuario:',
        ));

        $this->addElement('password', 'password', array(
            'filters'    => array('StringTrim'),
            'required'   => true,
            'label'      => 'Password:',
        ));
        
        $this->addElement('hidden', 'destino', array(
            'filters'    => array('StringTrim'),
        ));
        

        $this->addElement('submit', 'login2', array(
            'required' => false,
            'ignore'   => true,
            'label'    => 'Login',
        ));   
        
        

             
    }
}